Skip to main content
Version: 8.4.10.2

ExpirationControl

V8 Message Definiton

METADATA

AttributeValue
Topic1630-client-book-risk
MLink TokenClientControl
ProductSRControl
accessTypeSELECT,UPDATE,INSERT,DELETE

Table Definition

FieldTypeKeyDefault ValueComment
accntVARCHAR(16)PRI''
yearSMALLINTPRI0
monthTINYINT UNSIGNEDPRI0
dayTINYINT UNSIGNEDPRI0
clientFirmVARCHAR(16)PRI''SR client firm
expStatusenum - OptStatus'Hold'expiration trading control
minThetaFLOAT-1000xRM minimum net expiry theta
maxThetaFLOAT+1000xRM maximum net expiry theta
minWtVegaFLOAT-1000xRM minimum net expiry wtVegawtVega ve vol sqrtmax01 years 4
maxWtVegaFLOAT+1000xRM maximum net expiry wtVegawtVega ve vol sqrtmax01 years 4
maxWtVePctDdFLOAT100of minmax expiry wtVega in DD xde 030 strikes
maxWtVePctDnFLOAT100of minmax expiry wtVega in DN 030 xde 010 strikes
maxWtVePctAtFLOAT100of minmax expiry wtVega in AT 010 xde 010 strikes
maxWtVePctUpFLOAT100of minmax expiry wtVega in UP 010 xde 030 strikes
maxWtVePctDuFLOAT100of minmax expiry wtVega in DU 030 xde strikes
modifiedByVARCHAR(24)''user who last modified this record
modifiedInenum - SysEnvironment'None'
timestampDATETIME(6)'1900-01-01 00:00:00.000000'timestamp of last modification

PRIMARY KEY DEFINITION (Unique)

FieldSequence
accnt1
year2
month3
day4
clientFirm5

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRControl`.`MsgExpirationControl` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`year` SMALLINT NOT NULL DEFAULT 0,
`month` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`day` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR client firm',
`expStatus` ENUM('Hold','TwoWay','BuyOnly','SellOnly','CloseOnly','CloseNow','CloseRisk','BuyCloseOnly','SellCloseOnly') NOT NULL DEFAULT 'Hold' COMMENT 'expiration trading control',
`minTheta` FLOAT NOT NULL DEFAULT -1000 COMMENT '(xRM) minimum net expiry theta',
`maxTheta` FLOAT NOT NULL DEFAULT +1000 COMMENT '(xRM) maximum net expiry theta',
`minWtVega` FLOAT NOT NULL DEFAULT -1000 COMMENT '(xRM) minimum net expiry wtVega;wtVega = ve * vol / sqrt(max(0.1, years * 4))',
`maxWtVega` FLOAT NOT NULL DEFAULT +1000 COMMENT '(xRM) maximum net expiry wtVega;wtVega = ve * vol / sqrt(max(0.1, years * 4))',
`maxWtVePctDd` FLOAT NOT NULL DEFAULT 100 COMMENT '% of min/max expiry wtVega in DD {xde < -0.30} strikes',
`maxWtVePctDn` FLOAT NOT NULL DEFAULT 100 COMMENT '% of min/max expiry wtVega in DN {-0.30 <= xde < -0.10} strikes',
`maxWtVePctAt` FLOAT NOT NULL DEFAULT 100 COMMENT '% of min/max expiry wtVega in AT {-0.10 <= xde <= +0.10} strikes',
`maxWtVePctUp` FLOAT NOT NULL DEFAULT 100 COMMENT '% of min/max expiry wtVega in UP {+0.10 < xde <= +0.30} strikes',
`maxWtVePctDu` FLOAT NOT NULL DEFAULT 100 COMMENT '% of min/max expiry wtVega in DU {+0.30 < xde} strikes',
`modifiedBy` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'user who last modified this record',
`modifiedIn` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp of last modification',
PRIMARY KEY USING HASH (`accnt`,`year`,`month`,`day`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';

SELECT TABLE EXAMPLE QUERY

SELECT
`accnt`,
`year`,
`month`,
`day`,
`clientFirm`,
`expStatus`,
`minTheta`,
`maxTheta`,
`minWtVega`,
`maxWtVega`,
`maxWtVePctDd`,
`maxWtVePctDn`,
`maxWtVePctAt`,
`maxWtVePctUp`,
`maxWtVePctDu`,
`timestamp`
FROM `SRControl`.`MsgExpirationControl`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a SMALLINT */
`year` = 0
AND
/* Replace with a TINYINT UNSIGNED */
`month` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`day` = 1
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

UPDATE TABLE EXAMPLE QUERY

UPDATE `SRControl`.`MsgExpirationControl` 
SET
/* Replace with a ENUM('Hold','TwoWay','BuyOnly','SellOnly','CloseOnly','CloseNow','CloseRisk','BuyCloseOnly','SellCloseOnly') */
`expStatus` = 'Hold',
/* Replace with a FLOAT */
`minTheta` = 1.23,
/* Replace with a FLOAT */
`maxTheta` = 1.23,
/* Replace with a FLOAT */
`minWtVega` = 1.23,
/* Replace with a FLOAT */
`maxWtVega` = 1.23,
/* Replace with a FLOAT */
`maxWtVePctDd` = 1.23,
/* Replace with a FLOAT */
`maxWtVePctDn` = 1.23,
/* Replace with a FLOAT */
`maxWtVePctAt` = 1.23,
/* Replace with a FLOAT */
`maxWtVePctUp` = 1.23,
/* Replace with a FLOAT */
`maxWtVePctDu` = 1.23,
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000'
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a SMALLINT */
`year` = 0
AND
/* Replace with a TINYINT UNSIGNED */
`month` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`day` = 1
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

INSERT TABLE EXAMPLE QUERY

INSERT INTO `SRControl`.`MsgExpirationControl`(
/* Replace with a VARCHAR(16) */
`accnt`,
/* Replace with a SMALLINT */
`year`,
/* Replace with a TINYINT UNSIGNED */
`month`,
/* Replace with a TINYINT UNSIGNED */
`day`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a ENUM('Hold','TwoWay','BuyOnly','SellOnly','CloseOnly','CloseNow','CloseRisk','BuyCloseOnly','SellCloseOnly') */
`expStatus`,
/* Replace with a FLOAT */
`minTheta`,
/* Replace with a FLOAT */
`maxTheta`,
/* Replace with a FLOAT */
`minWtVega`,
/* Replace with a FLOAT */
`maxWtVega`,
/* Replace with a FLOAT */
`maxWtVePctDd`,
/* Replace with a FLOAT */
`maxWtVePctDn`,
/* Replace with a FLOAT */
`maxWtVePctAt`,
/* Replace with a FLOAT */
`maxWtVePctUp`,
/* Replace with a FLOAT */
`maxWtVePctDu`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'Example_accnt',
0,
1,
1,
'Example_clientFirm',
'Hold',
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
'2022-01-01 12:34:56.000000'
);

DELETE TABLE EXAMPLE QUERY

DELETE FROM `SRControl`.`MsgExpirationControl` 
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a SMALLINT */
`year` = 0
AND
/* Replace with a TINYINT UNSIGNED */
`month` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`day` = 1
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

Doc Columns Query

SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='ExpirationControl' ORDER BY ordinal_position ASC;